﻿using System;
using System.Configuration;
using System.Data;
using System.Data.Common;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using DbMetadata.Providers;
using DbMetadata.Providers.SqlServer;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace DbMetadata.Tests
{
    [TestClass]
    public class SqlMetadataTests : DbMetadataTests
    {
        
        
        private const string ConnectionString =
            @"Data Source=.\SQLEXPRESS;Initial Catalog=Northwind;Integrated Security=True";
                       
        protected override IDbConnection CreateConnection()
        {
            var connection = DbProviderFactories.GetFactory("System.Data.SqlClient").CreateConnection();
            connection.ConnectionString = ConnectionString;
            connection.Open();
            return connection;
        }

        protected override DbMetadataExtractor CreateMetadataExtractor(IDbConnection dbConnection)
        {
            return new SqlMetadataExtractor(dbConnection);
        }

       
    }
}
